package com.kitty.game.zhangmen;

import com.kitty.game.role.model.Role;
import com.kitty.game.enter.FiedValue;
import com.kitty.game.mirror.model.RoleMirror;
import com.kitty.game.utils.FieldUtils;
import com.kitty.mina.Modules;
import com.kitty.mina.annotation.MessageMeta;
import com.kitty.mina.message.Message;

import java.util.List;

/**返回掌门信息*/
@MessageMeta(module = Modules.MSG_MASTER_INFO)
public class RespMasterInfo extends Message {
    private int id;
    private short isLeader;
    private List<FiedValue> fieds;

    public RespMasterInfo(Role role, RoleMirror roleMirror) {
        id = 0;
        fieds= FieldUtils.getMasterInfo(roleMirror);
        isLeader = (short) (roleMirror.getUid()==role.getUid()?1:0);
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public short getIsLeader() {
        return isLeader;
    }

    public void setIsLeader(short isLeader) {
        this.isLeader = isLeader;
    }

    public List<FiedValue> getFieds() {
        return fieds;
    }

    public void setFieds(List<FiedValue> fieds) {
        this.fieds = fieds;
    }
}
